namespace Melody_Glider.GUIContent
{
    public class Cursor
    {
        private int _position;

        public Cursor(int position)
        {
            _position = position;
        }

        public int GetPosition()
        {
            return _position;
        }

        public void SetPosition(int pos)
        {
            _position = pos;
        }

        public void IncrementPosition()
        {
            _position++;
        }

        public void DecrementPosition()
        {
            _position--;
        }

        public void BringToStart()
        {
            _position = -1;
        }

        public void Reset()
        {
            _position = -2;
        }

        public bool IsSet()
        {
            return _position != -2;
        }

        public bool IsAtStart()
        {
            return _position == -1;
        }
    }
}
